﻿<DemoPageSectionComponent Id="Editors-DateEdit-UseClientDateTimeOffset" ShowSizeMode="true">
    <ChildContentWithParameters Context="Params">
        <label for="deDateOffset" class="demo-text cw-320 mb-1">
            Date
        </label>
        <DxDateEdit @bind-Date="@DateOffset"
                    CssClass="cw-320"
                    SizeMode="Params.SizeMode"
                    TimeSectionVisible="true"
                    InputId="deDateOffset">
        </DxDateEdit>
        <p class="demo-text cw-320 mt-3">
            Server Date: <b>@ServerDateOffset</b>
        </p>
    </ChildContentWithParameters>

    @code {
        DateTimeOffset DateOffset { get; set; } = DateTimeOffset.Now;
        DateTimeOffset ServerDateOffset => DateOffset.ToOffset(DateTimeOffset.Now.Offset);
    }
</DemoPageSectionComponent>
